package 剑指offer;

public class 二维数组的查找 {
    public boolean Find(int target,int[][] array){
        //考虑的是怎么找才最方便 所以从左下角开始找起
        int row = array[0].length-1;
        int column = 0;
        while ((row>=0)&&column<array[0].length){
           if (array[row][column]>target){
               row--;
           }else if (array[row][column]<target){
               column++;
           }else {
               return true;
           }

        }
        return false;

    }
}
